package com.example.demo.models.admin;

import com.example.demo.models.base.BaseEntity;
import gaarason.database.annotation.Column;
import gaarason.database.annotation.Table;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.ToString;
import lombok.experimental.Accessors;
import org.springframework.stereotype.Repository;

/**
 * @author lucifer
 * @since 2024-01-29-16:51
 */
@Data
@ToString(callSuper = true)
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = true)
@Table(name = "permissions")
public class Permission extends BaseEntity {
    private static final long serialVersionUID = 1L;

    /**
     * auto generator start
     **/
    @Column(name = "name", comment = "权限名")
    private String name;

    @Column(name = "description", comment = "权限描述")
    private String description;

    @Column(name = "data", comment = "权限标识")
    private String data;

    /**
     * auto generator end
     **/
    @Repository
    public static class Model extends BaseModel<Permission, Long> {
        @Override
        protected boolean softDeleting() {
            return true;
        }
    }
}
